<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>侦听器的实际使用方法</title>
</head>
<body>
<div id="app">
    <input type="text" v-model="name">
</div>
<script type="module">
    import {createApp, ref, watch} from "../../../../../js/vue.esm-browser.js";

    const app = createApp({
        setup() {

            let name = ref(null)

            watch(name, function (value) {
                console.log("当前输入框中的内容：" + value);
            })
            return {name}
        }
    })

    app.mount("#app")
</script>
</body>
</html>